<script src="/vendor/laravel-admin/AdminLTE/plugins/jQuery/jQuery-2.1.4.min.js"></script>
<script src="/vendor/laravel-admin/AdminLTE/bootstrap/js/bootstrap.min.js"></script>
<script src="/vendor/jquery/layer/layer.js"></script>
<script src="/vendor/laravel-admin/moment/min/moment-with-locales.min.js"></script>
<script src="/vendor/laravel-admin/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js"></script>
<link rel="stylesheet" href="/vendor/laravel-admin/AdminLTE/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="/vendor/laravel-admin/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css">
<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <label>姓名:</label>
                        {{$user_info['name']}}
                        <label>共计订单:</label>
                        {{$user_info['total']}}
                        <label>返佣金额</label>
                        {{$user_info['total_amount']}}
                    </div>
                </div>

            </div>

            <div class="box-body">
                <table id="brandList" class="table table-bordered table-hover">
                    <thead>
                    <tr>
                        <th>id</th>
                        <th>商品名称</th>
                        <th>金额</th>
                        <th style="width: 100px;">返佣比例</th>
                        <th style="width: 100px;">返佣金额</th>
                        <th style="width: 100px">订单状态</th>
                        <th style="width: 200px;">支付时间</th>
                        <th style="width: 200px">结算时间</th>
                        <th style="width: 100px;">转账状态</th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach ($data as $value)
                        <tr>
                            <td>{{$value["id"]}}</td>
                            <td>{{$value["item_title"]}}</td>
                            <td>{{$value["pay_price"]}}</td>
                            <td>{{$value["total_commission_rate"]}}%</td>
                            <td>{{$value["total_commission_fee"]}}</td>
                            <td>
                                @switch($value['tk_status'])
                                    @case(3)
                                    订单结算
                                    @break
                                    @case(11)
                                    拍下未付款
                                    @break
                                    @case(12)
                                    订单付款
                                    @break
                                    @case(13)
                                    订单失败
                                    @break
                                    @case(14)
                                    订单成功
                                    @break
                                    @default
                                    其他
                                @endswitch
                            </td>
                            <td>{{$value["tk_paid_time"]}}</td>
                            <td>{{$value["tk_earning_time"]}}</td>
                            <td>
                                @if($value['data_status'] == 1)
                                    待转账
                                @elseif($value['data_status'] == 2)
                                    转账成功
                                @elseif($value['data_status'] == 3)
                                    转账失败
                                @endif
                            </td>

                            {{--                            <td><a href="{{url('admin/brand/edit/'.$value["id"])}}"--}}
{{--                                   class="btn btn-primary">编辑</a>--}}
{{--                                <a href="{{url('admin/brand/brandArea/'.$value["id"])}}"--}}
{{--                                   class="btn btn-primary">编辑品牌专区</a>--}}
{{--                                <button class="btn btn-primary delete" data-value="{{$value["id"]}}">删除--}}
{{--                                </button>--}}
{{--                            </td>--}}
                        </tr>
                    @endforeach


                </table>
            </div>
            <div class="box-footer clearfix">
                {{$page}}
            </div>
        </div>
    </div>
</div>
<script>
    $(function(){
        $('.detail').click(function(){
            var url = $(this).attr('data-href');

            layer.open({
                type: 2,
                title: '预览',
                shadeClose: true,
                shade: 0.8,
                area: ['380px', '90%'],
                content: url
            });
        });

    })

</script>